<?

require_once  $_SERVER['DOCUMENT_ROOT']."/../_lib/base/common.php";
require_once SITE_ROOT_PATH."/_lib/classes/class.template.php";
require_once SITE_ROOT_PATH."/_lib/classes/class.hotels.php";
require_once SITE_ROOT_PATH."/_lib/classes/class.destinations.php";
require_once SITE_ROOT_PATH."/_lib/classes/class.exchange_rates.php";
require_once SITE_ROOT_PATH."/_lib/classes/class.bookings.php";
require_once SITE_ROOT_PATH."/_lib/classes/class.countries.php";
require_once SITE_ROOT_PATH."/_lib/classes/model/BoookingDetails.php";
require_once SITE_ROOT_PATH."/_lib/classes/model/BookingRoons.php";
require_once SITE_ROOT_PATH."/_lib/classes/class.hotel_supplier_low.php";

if($_REQUEST['sid']){
    session_id($_REQUEST['sid']);  
    session_start();
}else{
    session_start();
}

// avoid time limit
set_time_limit(0);

// check for search results and booking timeouts (see: common.php)
if($location = check_timeouts()) {
  header("Location: $location");
  exit;
}
if (!$_SESSION["booking"]["booking_id"]){
         header("Location: index.html");    
         exit;
}

$booking_id = $_SESSION["booking"]["booking_id"]; 
$booking_details = new BoookingDetails();
$booking = $booking_details->get_booking_with_details_by_booking_id($booking_id);
$hotelLow = new hotel_supplier_low();  
$hotel = $hotelLow->get_hotel_description($booking[0]['supplier_hotel_id']);
$rooms = new BookingRoons();
$booking_rooms = $rooms->get_booking_rooms_by_booking_detail_id($booking[0]['booking_detail_id']);
$booking_rooms = $booking_rooms;
$booking = $booking[0];
  



$template = new template();
$template->title = $title;
$template->meta_keywords = $meta_keywords;
$template->meta_description = $meta_description;
$template->section_highlight = "hotels";
$template->breadcrumbs_html = "<li>&rsaquo;</li><li title=\"Hotels\"><a href=\"/hotels/index.html\" title=\"Hotels\">Hotels</a></li><li>&rsaquo;</li><li title=\"Search Results\"><a href=\"/hotels/hotel_results.php\" title=\"Search Results\">Search Results</a></li>";
$template->left_col = false;
$template->show_tos = false;
$template->print_style = true;
$template->ld_head();
// Show confirm details page
include SITE_ROOT_PATH."/_lib/html/booking_confirm.php";
$template->ld_foot();
unset($_SESSION["booking"]["booking_id"]);
setcookie("sid", session_id());
	

?>